package com.orphan.marketBack.controller;

import com.orphan.marketBack.dto.OrderReturnDto;
import com.orphan.marketBack.service.impl.OrderReturnServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 退货维护
 */
@RestController
public class OrderReturnController {
    @Autowired
    OrderReturnServiceImpl orderReturnService;
    @RequestMapping("selectOrderReturn")
    public List<OrderReturnDto> selectOrderReturn(){
        List<OrderReturnDto> orderReturnDtos = orderReturnService.selectOrderReturn();
        return orderReturnDtos;
    }
    @PostMapping("selectOrderReturnByGoodsName")
    public List<OrderReturnDto> selectOrderReturnByGoodsName(OrderReturnDto orderReturnDto){
        List<OrderReturnDto> orderReturnDtos = orderReturnService.selectOrderReturnByGoodsName(orderReturnDto);
        return orderReturnDtos;
    }
}
